<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <base th:href="${#servletContext.getContextPath()+'/'}">

    <link rel="stylesheet" type="text/css" href="bootstrap-3.4.1/dist/css/bootstrap.css">
    <script type="text/javascript" src="js/jquery-3.6.1.min.js"></script>
    <script type="text/javascript" src="bootstrap-3.4.1/dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/http.js"></script>

    <script type="text/javascript">
        $(function () {
            $("#form-sysuser-add").submit(function () {
                submit("form-sysuser-add", "SystemUserServlet/add", function (data) {
                    // 这个函数服务端响应成功后调用
                    location.href = "SystemUserServlet/list"
                });
                return false;
            });
        })
    </script>
</head>
<body>
<form class="form-horizontal" id="form-sysuser-add">
    <div class="form-group">
        <label class="col-sm-2 control-label">username</label>
        <div class="col-sm-2">
            <input type="text" class="form-control" name="username" value="toString" placeholder="请输入用户名">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">password</label>
        <div class="col-sm-2">
            <input type="password" class="form-control" name="password" value="toString" placeholder="Password">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">email</label>
        <div class="col-sm-2">
            <input type="email" class="form-control" name="email" value="toString@qq.com" placeholder="email...">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">birthday</label>
        <div class="col-sm-2">
            <input type="date" class="form-control" name="birthday" value="2022-11-30" placeholder="birthday...">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">sex</label>
        <div class="radio">
            <label class="radio-inline">
                <input type="radio" name="sex" value="1">男
            </label>
            <label class="radio-inline">
                <input type="radio" name="sex" value="0" checked>女
            </label>
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">添加</button>
        </div>
    </div>
</form>
</body>
</html>